import torch
import cv2
model = torch.hub.load("ultralytics/yolov8","yolov8n")
image_file="/Users/zwf/Downloads/a.jpeg"
img = cv2.imread(image_file)
res = model(img)
res.show()